package cn.yunbamboos.rest.service;


import cn.yunbamboos.rest.service.dto.in.BaseInDTO;
import cn.yunbamboos.rest.service.dto.out.BaseOutDTO;
import cn.yunbamboos.rest.service.filter.RestServiceFilter;
import cn.yunbamboos.rest.service.transaction.Transaction;

/**
 * 服务
 */
public interface IRestService {

    String url();

    String name();

    boolean authentication();

    boolean log();

    Transaction transaction();

    Class<? extends RestServiceFilter>[] filters();

    Class<? extends RestServiceFilter>[] afterFilters();

    Class<? extends BaseInDTO> in();

    Class<? extends BaseOutDTO> out();

    ICreateInDTO createInDTO();

    IBeanInvoke invoke();

    interface Builder {

        Builder url(String url);

        Builder name(String name);

        Builder authentication(boolean authentication);

        Builder log(boolean log);

        Builder transaction(Transaction transaction);

        Builder filters(Class<? extends RestServiceFilter>[] filters);

        Builder afterFilters(Class<? extends RestServiceFilter>[] filters);

        Builder in(Class<? extends BaseInDTO> in);

        Builder out(Class<? extends BaseOutDTO> out);

        Builder createInDTO(ICreateInDTO createInDTO);

        Builder invoke(IBeanInvoke beanInvoke);

        IRestService build();

    }

}
